<style>
    .ui.modal .center>.button {
        margin-left: 0px !important;
    }
</style>

<!--内容区开始-->
<div class="cont">
    <!--二级标题-->
    <div class="position">
        <img alt="位置图标" src="dist/images/position.png" />风控管理&gt;风险管理
        <a ng-click="openDetail()" ng-hide="$needClientCache" title="打开新窗口查看"><i class="large External icon"></i></a>
    </div>
    <!--查看方式-->
    <div class="mybackground">
        <div class="cont_fr_top">
            <div class="menus_top">
                <div class="menus_l">处理状态：</div>
                <ul id="nav">
                    <li>
                        <a ng-click="search_param.status=-1">全部</a>
                    </li>
                    <li class="selected">
                        <a ng-click="search_param.status=0">未处理</a>
                    </li>
                    <li>
                        <a ng-click="search_param.status=1">处理中</a>
                    </li>
                    <li>
                        <a ng-click="search_param.status=2">已处理</a>
                    </li>
                    <li>
                        <a ng-click="search_param.status=3">挂起</a>
                    </li>
                </ul>
                <div class="cont_fr_btn">
                    <div class="fr">
                        <!--<button class="cont_f_btn1" ng-model="file" ngf-select><i class="download icon"></i>导入</button>-->
                        <!--<button class="cont_f_btn3" ng-click="add_popup()"><i class="add icon"></i>添加</button>-->
                    </div>
                </div>
            </div>
            <div class="menus">
                <div class="menus_con">
                    <div class="ui form">
                        <div class="four fields">
                            <div class="inline field">
                                <label>客户名</label>
                                <input type="text" ng-model="search_param.userphone" style="width:160px;" placeholder="昵称/电话号码" ng-keyup="$event.keyCode == 13 && search()">
                            </div>
                            <div class="inline field">
                                <label>业务人员</label>
                                <input type="text" ng-model="search_param.sales" style="width:160px;" placeholder="员工姓名" ng-keyup="$event.keyCode == 13 && search()">
                            </div>
                            <div class="inline field">
                                <label>开始时间</label>
                                <div class="ui left icon input">
                                    <input type="text" ng-model="search_param.start_time" style="width:160px;" datetimepicker id="s_start_time" format='YYYY-MM-DD' class="input_text" placeholder="开始时间" ng-keyup="$event.keyCode == 13 && search()">&nbsp;
                                    <i class="calendar icon"></i>
                                </div>
                            </div>
                            <div class="inline field">
                                <label>结束时间</label>
                                <div class="ui left icon input">
                                    <input type="text" ng-model="search_param.end_time" style="width:160px;" datetimepicker id="s_end_time" format='YYYY-MM-DD' class="input_text" placeholder="结束时间" ng-keyup="$event.keyCode == 13 && search()">
                                    <i class="calendar icon"></i>
                                </div>
                            </div>
                        </div>
                        <div class="fields" style="margin-left: 3.4em;">
                            <div class="four wide field">
                                <button class="search_btn" ng-click="search()">查询</button>
                                <button class="clear_btn" ng-click="riskExport()">导出</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="menus_table">
        <!--表格-->
        <table class="ui yellow celled striped table">
            <thead>
                <tr>
                    <th>客户</th>
                    <th>电话</th>
                    <th>重复投诉</th>
                    <th>业务员</th>
                    <th>经理</th>
                    <th>团队</th>
                    <th style="width: 110px;">风控产生时间</th>
                    <th style="width: 110px;">最近反馈时间</th>
                    <th>风险等级</th>
                    <th>状态</th>
                    <th style="width: 120px;text-align: center;">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="vrisk in risklist">
                    <!--Wjw 20170707 修改浮窗-->
                    <td ng-if="vrisk.is_customer==2">{{::vrisk.customer_name}}</td>
                    <td ng-if="vrisk.is_customer==1"><div float_layer customer-id='vrisk.customer_id' show-name="vrisk.customer_name"></div></td>
                    <!--修改浮窗结束-->
                    <td ng-attr-title="{{::vrisk.show_phone}}">{{::vrisk.show_phone}}</td>
                    <td>
                        <p style="color: red;" ng-if="vrisk.is_repeat==1">是</p>
                        <p ng-if="vrisk.is_repeat==0">否</p>
                    </td>
                    <td>{{::vrisk.sales_name}}</td>
                    <td>{{::vrisk.manager_name}}</td>
                    <td>{{::vrisk.company}}</td>
                    <td ng-attr-title="{{::vrisk.create_time|limitTo:10}}">{{::vrisk.create_time|limitTo:10}}</td>
                    <td ng-attr-title="{{::vrisk.confirm_time|limitTo:10}}">{{::vrisk.confirm_time|limitTo:10}}</td>
                    <td>
                        <div class="ui star rating starlist" data-rating="{{::vrisk.level}}" data-max-rating="{{::vrisk.level}}"></div>
                    </td>
                    <td>
                        <span status-trans status="{{::vrisk.status}}"></span>
                    </td>
                    <td style="text-align: center;">
                        <a ng-if="vrisk.status!=2" ng-click="track_popup(vrisk)">编辑</a>
                        <!--<a ng-click="confirm_popup( vrisk )" ng-if="vrisk.status==0"> 反馈确认</a>-->
                        <!--<a ng-if="vrisk.status==1" ng-click="track_popup( vrisk )">追踪</a>-->
                        <!--<a ng-if="vrisk.status==1" ng-click="track_hangup(vrisk, 1 )">挂起</a>-->
                        <!--<a ng-if="vrisk.status==1" ng-click="track_close(vrisk, 1 )">完结</a>-->
                        <!--<a ng-if="vrisk.status==3" ng-click="track_hangup(vrisk, 0)">取消挂起</a>-->
                        <!--<a ng-if="vrisk.status==2" ng-click="track_close(vrisk, 0)">未完结</a>-->
                        <a ng-if="vrisk.status==2" ng-click="view_popup( vrisk )">查看</a>
                        <a ng-if="vrisk.status==0" ng-click="remove_popup( vrisk )">删除</a>
                    </td>
                </tr>
                <tr ng-show="(risklist && risklist.length==0 ) ||(!risklist) ">
                    <td colspan="9" style="color:red; ">
                        <p style="text-align:center; ">还没有找到数据~~~</p>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="ui pagination menu fr" ng-show="riskpage.pageAll> 1" class="ui borderless pagination menu" jspagination page-object="riskpage" page-func="getRiskList">
        </div>
    </div>
    <!--分页-->
</div>
<!--内容区结束-->

<!-- 新增风险 -->
<div class="ui add modal">
    <i class="close icon"></i>
    <div class="header_h4">添加风险</div>
    <div class="content">
        <form action="#" class="add form">
            <div class="ui form">
                <div class="fields">
                    <div class="five wide field required">
                        <label class="label_fl">客户姓名</label>
                        <input type="text" name="add_data[customer_name]" ng-model="add_data.customer_name" style="width: 160px;" placeholder="客户名">
                        <!--<input type="hidden" name="add_data[customer_name]" id="add_data_customer_name1" />-->
                        <!--<div angucomplete-alt style="width:160px; float: left" id="add_data_customer_name2" placeholder="客户姓名" pause="100" selected-object="selectCustomer" input-changed="customerInputChanged" minlength="1" local-data="customer" search-fields="nickname,phone"
                            title-field="nickname" minlength="0" input-class="form-control form-control-small" match-class="highlight">
                        </div>-->
                    </div>
                    <div class="five wide field required">
                        <label class="label_fl">电话号码</label>
                        <input style="width: 160px;" type="text" ng-model="add_data.customer_phone" id="add_data_customer_phone1" name="add_data[customer_phone]" maxlength="11" placeholder="电话号码">
                    </div>
                    <div class="six wide field">
                        <div class="inline field">
                            <label>风险等级</label>
                            <div class="ui disabled transparent input" style="width: 130px;">
                                <input type="text" style="width: 130px;" ng-model="add_data.level" name="add_data[level]" name="level" value="1">
                            </div>
                        </div>
                        <div class="ui star rating add-rating" data-rating="1" data-max-rating="5"></div>
                    </div>
                </div>
                <div class="fields">
                    <div class="five wide field required">
                        <label class="label_fl">业务人员</label>
                        <input type="text" style="width: 160px;" maxlength="20" id="add_data_sales_name1" name="add_data[sales_name]" ng-model="add_data.sales_name" placeholder="业务人员">
                    </div>
                    <div class="five wide field required">
                        <label class="label_fl">团队经理</label>
                        <input type="text" style="width: 160px;" ng-model="add_data.manager_name" id="add_data_manager_name1" name="add_data[manager_name]" maxlength="11" placeholder="团队经理">
                    </div>
                    <div class="six wide field required">
                        <label class="label_fl">所属团队</label>
                        <select class="more ui dropdown fl" style="width: 160px;" ng-model="add_data.sales_company" id="add_data_sales_company1" name="add_data[sales_company]">
                            <option value="">所属分公司</option>
                            <option value="{{voption.sector_id}}" ng-repeat="voption in pageOption.subcompany" ng-selelected="add_data[sales_company] == voption.sector_id">
                                {{voption.sector_name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="field" style="margin-top: 1em;">
                    <div class="ui toggle checkbox">
                        <input type="checkbox" ng-model="add_data.is_repeat">
                        <label>客户重复投诉</label>
                    </div>
                </div>
                <div class="field required">
                    <label>风险情况说明</label>
                    <textarea rows="2" ng-model="add_data.description" name="add_data[description]"></textarea>
                </div>
                <div class="twelve wide field required">
                    <label class="label_fl">反馈情况</label>
                    <input type="text" ng-model="add_data.feedback" name="add_data[feedback]" style="width:450px;">
                </div>
                <div class="field">
                    <label>备注说明</label>
                    <textarea rows="2" ng-model="add_data.remark" name="add_data[remark]"></textarea>
                </div>
            </div>
        </form>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- 新增风险 -->

<!-- 编辑风险 -->
<div class="ui edit modal">
    <i class="close icon"></i>
    <div class="header_h4">编辑风险</div>
    <div class="content">
        <form action="#" class="popup update form">
            <div class="ui form">
                <div class="fields">
                    <div class="five wide field required">
                        <label class="label_fl">客户姓名</label>
                        <input type="hidden" name="add_data[customer_name]" id="add_data_customer_name3" />
                        <div angucomplete-alt style="width:160px; float: left;" id="add_data_customer_name4" placeholder="客户姓名" pause="10" minlength="1" selected-object="selectCustomer" input-changed="customerInputChanged" local-data="customer" search-fields="nickname,phone"
                            title-field="nickname" minlength="0" input-class="form-control form-control-small">
                        </div>
                    </div>
                    <div class="five wide field required">
                        <label class="label_fl">电话号码</label>
                        <input type="text" style="width: 160px;" ng-model="add_data.customer_phone" id="add_data_customer_phone2" name="add_data[customer_phone]" maxlength="11" placeholder="电话号码">
                    </div>
                    <div class="six wide field">
                        <div class="inline field">
                            <label>风险等级</label>
                            <div class="ui disabled transparent input" style="width: 130px;">
                                <input type="text" ng-model="add_data.level" name="add_data[level]" name="level" value="1">
                            </div>
                        </div>
                        <div class="ui star rating add-rating" data-rating="1" data-max-rating="5"></div>
                    </div>
                </div>
                <div class="fields">
                    <div class="five wide field required">
                        <label class="label_fl">业务人员</label>
                        <input type="text" style="width: 160px;" ng-blur="saleName()" maxlength="20" id="add_data_sales_name2" name="add_data[sales_name]" ng-model="add_data.sales_name" placeholder="业务人员">
                    </div>
                    <div class="five wide field required">
                        <label class="label_fl">团队经理</label>
                        <input type="text" style="width: 160px;" ng-blur="saleManager()" ng-model="add_data.manager_name" id="add_data_manager_name2" name="add_data[manager_name]" maxlength="11" placeholder="团队经理">
                    </div>
                    <div class="six wide field">
                        <label class="label_fl">所属团队</label>
                        <select class="more ui dropdown fl" style="width: 160px;" ng-model="add_data.sales_subcompany" id="add_data_sales_company2" name="add_data[sales_company]">
                            <option value="">所属分公司</option>
                            <option value="{{voption.sector_id}}" ng-repeat="voption in pageOption.subcompany" ng-selelected="add_data[sales_subcompany] == voption.sector_id">
                                {{voption.sector_name}}
                            </option>
                        </select>
                    </div>
                </div>
                <div class="field">
                    <div class="ui toggle checkbox">
                        <input type="checkbox" ng-model="add_data.is_repeat">
                        <label>客户重复投诉</label>
                    </div>
                </div>
                <div class="field required">
                    <label>风险情况说明</label>
                    <textarea rows="2" ng-model="add_data.description" name="add_data[description]"></textarea>
                </div>
                <div class="fields">
                    <div class="six field required">
                        <label class="label_fl">处理情况</label>
                        <select class="more ui dropdown fl" style="width: 160px;" ng-model="add_data.status" name="add_data[status]">
                            <option value="">本次处理情况</option>
                            <option value="0">未处理</option>
                            <option value="1">正在处理中</option>
                            <option value="2">处理完成或者关闭</option>
                            <option value="3">挂起</option>
                        </select>
                    </div>
                </div>
                <div class="twelve wide field required">
                    <label class="label_fl">反馈情况</label>
                    <input type="text" ng-model="add_data.reply" name="add_data[feedback]" placeholder="反馈情况" style="width:450px;">
                </div>
                <div class="field">
                    <label>备注说明</label>
                    <textarea rows="2" ng-model="add_data.remark" name="add_data[remark]"></textarea>
                </div>
            </div>
        </form>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- 编辑风险 -->

<!-- 反馈确认 -->
<div class="ui confirm modal">
    <i class="close icon"></i>
    <div class="header_h4">反馈确认</div>
    <div class="content">
        <form action="#">
            <div class="ui form confirm">
                <div class="three fields">
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>客户姓名：</label>
                        <div>{{risk_detail.customer_name}}</div>
                    </div>
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>电话号码：</label>
                        <div>{{risk_detail.customer_phone}}</div>
                    </div>
                    <div class="inline field">
                        <label>风险等级：</label>
                        <div class="ui star rating starconfirm" data-rating="{{risk_detail.level}}" data-max-rating="{{risk_detail.level}}"></div>
                    </div>
                </div>
                <div class="three fields">
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>业务人员：</label>
                        <div>{{risk_detail.sales_name}}</div>
                    </div>
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>团队经理：</label>
                        <div>{{risk_detail.manager_name}}</div>
                    </div>
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>所属团队：</label>
                        <div>{{risk_detail.company}}</div>
                    </div>
                </div>
                <div class="fields">
                    <div class="inline fields" style="margin-left: 0.5em;">
                        <label>客户重复投诉：</label>
                        <div>{{risk_detail.is_repeat == '1'?'是':'否'}}</div>
                    </div>
                </div>
                <div class="ui hidden divider"></div>
                <div class="field required">
                    <label>风险情况说明</label>
                    <textarea rows="2" ng-model="risk_detail.description" name="risk_detail[description]" ng-readonly="true"></textarea>
                </div>
                <div class="fields">
                    <div class="six field required">
                        <label class="label_fl">处理情况</label>
                        <select class="more ui dropdown fl" style="width: 160px;" ng-model="risk_detail.status" name="risk_detail[status]">
                            <option value="">本次处理情况</option>
                            <option value="0">未处理</option>
                            <option value="1">正在处理中</option>
                            <option value="2">处理完成或者关闭</option>
                            <option value="3">挂起</option>
                        </select>
                    </div>
                </div>
                <div class="eleven wide field required">
                    <label class="label_fl">反馈情况</label>
                    <input type="text" ng-model="risk_detail.reply" name="add_data[feedback]" ng-readonly="true" style="width: 450px;">
                </div>
                <div class="field required">
                    <label class="label_fl">反馈情况确认</label>
                    <input type="text" ng-model="risk_detail.confirm" name="confirm[confirm]" placeholder="追踪结果">
                </div>
            </div>
        </form>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- 反馈确认 -->

<!-- 风险追踪 -->
<div class="ui track modal">
    <i class="close icon"></i>
    <div class="header_h4">风险追踪</div>
    <div class="content">
        <form class="track form">
            <div class="ui form">
                <div class="fields">
                    <div class="five wide inline field">
                        <label style="margin-right: 1em;">客户姓名：</label>{{::track_data.customer_name}}
                    </div>
                    <div class="five wide inline field">
                        <label style="margin-right: 1em;">电话号码：</label>{{::track_data.customer_phone}}
                    </div>
                    <div class="five wide inline field">
                        <label style="margin-right: 1em;">风险处理情况：</label>{{::track_data.status_show}}
                    </div>
                </div>
                <div class="fields">
                    <div class="five wide inline field">
                        <label style="margin-right: 1em;">业务人员：</label>{{::track_data.sales_name}}
                    </div>
                    <div class="five wide inline field">
                        <label style="margin-right: 1em;">团队经理：</label>{{::track_data.manager_name}}
                    </div>
                    <div class="six wide inline field">
                        <label style="margin-right: 1em;">所属团队：</label>{{::track_data.company}}
                    </div>
                </div>
                <div class="field">
                    <label>风险情况说明</label>
                    <textarea rows="2" ng-model="track_data.description" readonly></textarea>
                </div>
                <div class="ui" style="padding-bottom: 20px;">
                    <div class="field">
                        <label>追踪记录</label>
                    </div>
                    <table class="ui yellow striped celled table" ng-if="track_list&&track_list.length>0" style="min-width:400px;">
                        <thead>
                            <tr>
                                <th style="width: 20%;">确认时间</th>
                                <th style="width: 40%;">相关人员反馈</th>
                                <th style="width: 40%;">追踪结果</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="vitem in track_list ">
                                <td>{{::vitem.confirm_time | limitTo : 10}}</td>
                                <td ng-attr-title="{{::vitem.reply}}">{{::vitem.reply}}</td>
                                <td ng-attr-title="{{::vitem.reply_confirm}}" >{{::vitem.reply_confirm}}</td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="ui yellow message" ng-if=" !track_list||track_list.length==0 ">
                        该风险暂时没有追踪记录!
                    </div>
                </div>
                <div class="fields">
                    <div class="five wide field required">
                        <label class="label_fl">处理情况</label>
                        <select class="more ui dropdown fl" ng-model="track_data.status" name="add_data[status]">
                            <option value="">本次处理情况</option>
                            <option value="0">未处理</option>
                            <option value="1">处理中</option>
                            <option value="2">已处理</option>
                            <option value="3">挂起</option>
                        </select>
                    </div>
                    <div class="five wide field">
                        <div class="inline field">
                            <label>风险等级</label>
                            <div class="ui disabled transparent input" style="width: 130px;">
                                <input type="text" ng-model="track_data.level" name="add_data[level]" name="level" value="1">
                            </div>
                        </div>
                        <div class="ui star rating add-rating" data-rating="1" data-max-rating="5"></div>
                    </div>
                    <div class="six wide field">
                        <div class="ui toggle checkbox">
                            <input type="checkbox" ng-model="track_data.is_repeat">
                            <label>客户重复投诉</label>
                        </div>
                    </div>
                </div>
                <div class="twelve wide field required">
                    <label class="label_fl">相关人员反馈</label>
                    <input type="text" ng-model="track_data.reply" name="track[reply]" placeholder="反馈情况" style="width:450px;">
                </div>
                <div class="twelve wide field required">
                    <label class="label_fl">追踪结果</label>
                    <input type="text" ng-model="track_data.reply_confirm" name="track[reply_confirm]" placeholder="追踪结果" style="width:450px;margin-left: 2em;">
                </div>
            </div>
        </form>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- 风险追踪 -->

<!-- 风险查看 -->
<div class="ui view modal">
    <i class="close icon"></i>
    <div class="header_h4">风险查看</div>
    <div class="content">
        <div class="ui form">
            <div class="fields">
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">客户姓名：</label>{{::track_data.customer_name}}
                </div>
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">电话号码：</label>{{::track_data.customer_phone}}
                </div>
            </div>
            <div class="fields">
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">业务人员：</label>{{::track_data.sales_name}}
                </div>
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">团队经理：</label>{{::track_data.manager_name}}
                </div>
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">所属团队：</label>{{::track_data.company}}
                </div>
            </div>
            <div class="fields">
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">客户重复投诉：</label>{{track_data.is_repeat == '1'?'是':'否'}}
                </div>
                <div class="five wide inline field">
                    <label style="margin-right: 1em;">风险处理情况：</label>{{track_data.status_show}}
                </div>
                <div class="six wide inline field">
                    <label style="margin-right: 1em;">风险等级：</label>
                    <div class="ui see star rating startrack disabled" data-rating="{{track_data.level}}" data-min-rating="1" data-max-rating="5"></div>
                </div>
            </div>
            <div class="ui hidden divider"></div>
            <div class="field">
                <label>风险情况说明</label>
                <textarea rows="2" ng-model="track_data.description" readonly></textarea>
            </div>
            <div class="ui" style="padding-bottom: 20px;">
                <div class="field">
                    <label>追踪记录</label>
                </div>
                <table class="ui yellow striped celled table" ng-if="track_list&&track_list.length>0" style="min-width:400px;">
                    <thead>
                        <tr>
                            <th style="width: 20%;">确认时间</th>
                            <th style="width: 40%;">相关人员反馈</th>
                            <th style="width: 40%;">追踪结果</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="vitem in track_list ">
                            <td>{{::vitem.confirm_time | limitTo : 10}}</td>
                            <td ng-attr-title="{{::vitem.reply}}" >{{::vitem.reply}}</td>
                            <td ng-attr-title="{{::vitem.reply_confirm}}" >{{::vitem.reply_confirm}}</td>
                        </tr>
                    </tbody>
                </table>
                <div class="ui yellow message" ng-if=" !track_list||track_list.length==0 ">
                    该风险暂时没有追踪记录!
                </div>
            </div>
        </div>
    </div>
    <div class="actions center" style="text-align: center;">
        <button class="ui green button positive">关闭</button>
    </div>
</div>
<!-- 风险查看 -->

<!-- 风险详情说明弹出层 -->
<div class="ui description modal">
    <div class="ui yellow message">
        {{description}}
    </div>
</div>
<!-- 风险详情说明弹出层 -->

<!-- Excel上传导入 -->
<div class="ui small import modal" style="min-height: 250px;">
    <div class="ui header">
        风险数据导入错误返回信息，失败{{state.msg.length}}条
    </div>
    <div class="content">
        <div class="field">
            <table class="ui yellow table">
                <thead>
                    <tr>
                        <th style="width:15%">编号</th>
                        <th style="width:35%">错误信息</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="vstate in state.msg">
                        <td>{{vstate.id}}</td>
                        <td>{{vstate.msg}}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>
<!-- Excel上传导入 -->

<!--添加成功-->
<div class="ui modal modal1" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge green check circle outline icon"></i>
        <p style="padding-top: 15px;">添加成功</p>
    </div>
</div>
<!--添加失败-->
<div class="ui modal modal2" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge red remove circle outline icon"></i>
        <p style="padding-top: 15px;">添加失败</p>
    </div>
</div>
<!--确认删除-->
<div class="ui modal modal3">
    <div class="header" style="text-align: center;">删除风险管理信息</div>
    <div class="content" style="text-align: center;">
        <i class="huge blue help circle icon"></i>
        <p style="padding-top: 15px;">确认删除该风险管理信息？</p>
    </div>
    <div class="actions" style="text-align: center;">
        <button class="ui green button positive">确认</button>
        <button class="ui grey button negative">取消</button>
    </div>
</div>

<!--编辑成功-->
<div class="ui modal modal4" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge green check circle outline icon"></i>
        <p style="padding-top: 15px;">更新成功</p>
    </div>
</div>

<!--编辑失败-->
<div class="ui modal modal5" style="text-align: center;">
    <div class="header center aligned">提示</div>
    <div class="content center aligned">
        <i class="huge red remove circle outline icon"></i>
        <p style="padding-top: 15px;">更新失败</p>
    </div>
</div>

<script type="text/javascript">
    //登记所有需要blur验证的hidden input，振东和张叶商量放在公共js中供大家调用
    //hiddenID: hidden input的id
    //visibleID: hidden input对应的可视input id，通常由输入组件运行时动态创建。如ConMsg动态生成ConMsg_value
    function registerHiddenBlur(hiddenID, visibleID) {
        $('#' + visibleID).blur(function() {
            //延时触发blur，目的是让hidden input先于blur被赋值
            setTimeout(function() {
                $('#' + hiddenID).trigger('blur');
            }, 100);
        });
    }

    $(function() {
        $('.add-rating').rating({
            onRate: function(v) {
                $("input[name='add_data[level]']").val(v).trigger('input');
            }
        });

        $('.ui.dropdown').dropdown();
        $("#nav li").click(function() {
            $(this).addClass('selected').siblings().removeClass('selected');
        });

        //新增风险控制表单验证
        $('.add.form').form({
            inline: true,
            on: 'blur',
            fields: {
                customer_name: {
                    identifier: 'add_data[customer_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '该姓名客户不存在'
                    }]
                },
                customer_phone: {
                    identifier: 'add_data[customer_phone]',
                    rules: [{
                        type: 'empty',
                        prompt: '联系方式不能为空'
                    }, {
                        type: 'exactLength[11]',
                        prompt: '请输入正确人电话号码格式'
                    }]
                },
                sales: {
                    identifier: 'add_data[sales_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员不能为空'
                    }]
                },
                manager_name: {
                    identifier: 'add_data[manager_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员的经理不能为空'
                    }]
                },
                sales_subcompany: {
                    identifier: 'add_data[sales_company]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员所属分公司不能为空'
                    }]
                },
                description: {
                    identifier: 'add_data[description]',
                    rules: [{
                        type: 'empty',
                        prompt: '风险情况不能为空'
                    }]
                },
                feedback: {
                    identifier: 'add_data[feedback]',
                    rules: [{
                        type: 'empty',
                        prompt: '风险情况不能为空'
                    }]
                },
            }
        });

        //编辑风险控制表单验证
        $('.update.form').form({
            inline: true,
            on: 'blur',
            fields: {
                customer_name: {
                    identifier: 'add_data[customer_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '该姓名客户不存在'
                    }]
                },

                customer_phone: {
                    identifier: 'add_data[customer_phone]',
                    rules: [{
                        type: 'empty',
                        prompt: '联系方式不能为空'
                    }, {
                        type: 'exactLength[11]',
                        prompt: '请输入正确人电话号码格式'
                    }]
                },
                sales: {
                    identifier: 'add_data[sales_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员不能为空'
                    }]
                },
                manager_name: {
                    identifier: 'add_data[manager_name]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员的经理不能为空'
                    }]
                },
                sales_subcompany: {
                    identifier: 'add_data[sales_company]',
                    rules: [{
                        type: 'empty',
                        prompt: '业务人员所属分公司不能为空'
                    }]
                },
                description: {
                    identifier: 'add_data[description]',
                    rules: [{
                        type: 'empty',
                        prompt: '风险情况不能为空'
                    }]
                },
                feedback: {
                    identifier: 'add_data[feedback]',
                    rules: [{
                        type: 'empty',
                        prompt: '风险情况不能为空'
                    }]
                },
            }
        });

        //反馈确认表单验证
        $('.ui.form.confirm').form({
            inline: true,
            on: 'blur',
            fields: {
                confirm: {
                    identifier: 'confirm[confirm]',
                    rules: [{
                        type: 'empty',
                        prompt: '确认情况不能为空'
                    }]
                }
            }
        });

        //风险追踪确认
        $('.track.form').form({
            inline: true,
            on: 'blur',
            fields: {
                reply_confirm: {
                    identifier: 'track[reply_confirm]',
                    rules: [{
                        type: 'empty',
                        prompt: '确认结果不能为空'
                    }]
                },
                replay: {
                    identifier: 'track[reply]',
                    rules: [{
                        type: 'empty',
                        prompt: '相关人员反馈不能为空'
                    }]
                },
            }
        });

        //延时登记所有需要blur验证的hidden input（可视的input开始时未生成）
        setTimeout(function() {
            /*add*/
            registerHiddenBlur('add_data_customer_name1', 'add_data_customer_name2_value');
            /*update*/
            registerHiddenBlur('add_data_customer_name3', 'add_data_customer_name4_value');
            // registerHiddenBlur('add_user', 'ConMsgUser_value');
        }, 500);


    });
</script>


<!--弹框结束-->